package android.textIt.backend.model;

import android.database.Cursor;

public class User extends Contact {

  private static final long serialVersionUID = 2272556664127354658L;

  private long phone = 000000000;
  private int isTextItUser = 0;
  private long iGroup = -1;

  public User() {
  }

  public User(Cursor c) {
    id = c.getInt(0);
    name = c.getString(1);
    isTextItUser = c.getInt(2);
    phone = c.getLong(3);
    reference_id = c.getLong(4);
    iGroup = c.getInt(5);
  }

  public User(String name, long phone, boolean isTextItUser) {
    super();
    this.name = name;
    this.phone = phone;
    if (isTextItUser)
      this.isTextItUser = 1;
    else
      this.isTextItUser = 0;
  }

  public User(int id) {
   this.id= id;
  }

  /**
   * @return the isTextItUser 1--> Yes 0--> No
   */
  public boolean isTextItUser() {
    return isTextItUser == 1;
  }

  /**
   * @return the isTextItUser
   */
  public int getIsTextItUser() {
    return isTextItUser;
  }

  /**
   * @param isTextItUser
   *          the isTextItUser to set
   */
  public void setIsTextItUser(int isTextItUser) {
    this.isTextItUser = isTextItUser;
  }

  /**
   * @return the phone
   */
  public long getPhone() {
    return phone;
  }

  /**
   * @param phone
   *          the phone to set
   */
  public void setPhone(long phone) {
    this.phone = phone;
  }

  /**
   * @return the iGroup
   */
  public long getiGroup() {
    return iGroup;
  }

  /**
   * @param iGroup the iGroup to set
   */
  public void setiGroup(long iGroup) {
    this.iGroup = iGroup;
  }
 
}
